home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / g_quake / dropde-2.zip / PLAYER.QC < prev    next >
Text File  |  1996-09-27  |  20KB  |  735 lines

  1.  
  2. void() bubble_bob;
  3. void() W_FireChain;
  4. void() player_chain5;
  5. void() player_chain4;
  6.  
  7. /*
  8. ==============================================================================
  9.  
  10. PLAYER
  11.  
  12. ==============================================================================
  13. */
  14.  
  15. $cd /raid/quake/id1/models/player_4
  16. $origin 0 -6 24
  17. $base base        
  18. $skin skin
  19.  
  20. //
  21. // running
  22. //
  23. $frame axrun1 axrun2 axrun3 axrun4 axrun5 axrun6
  24.  
  25. $frame rockrun1 rockrun2 rockrun3 rockrun4 rockrun5 rockrun6
  26.  
  27. //
  28. // standing
  29. //
  30. $frame stand1 stand2 stand3 stand4 stand5
  31.  
  32. $frame axstnd1 axstnd2 axstnd3 axstnd4 axstnd5 axstnd6
  33. $frame axstnd7 axstnd8 axstnd9 axstnd10 axstnd11 axstnd12
  34.  
  35.  
  36. //
  37. // pain
  38. //
  39. $frame axpain1 axpain2 axpain3 axpain4 axpain5 axpain6
  40.  
  41. $frame pain1 pain2 pain3 pain4 pain5 pain6
  42.  
  43.  
  44. //
  45. // death
  46. //
  47.  
  48. $frame axdeth1 axdeth2 axdeth3 axdeth4 axdeth5 axdeth6
  49. $frame axdeth7 axdeth8 axdeth9
  50.  
  51. $frame deatha1 deatha2 deatha3 deatha4 deatha5 deatha6 deatha7 deatha8
  52. $frame deatha9 deatha10 deatha11
  53.  
  54. $frame deathb1 deathb2 deathb3 deathb4 deathb5 deathb6 deathb7 deathb8
  55. $frame deathb9
  56.  
  57. $frame deathc1 deathc2 deathc3 deathc4 deathc5 deathc6 deathc7 deathc8
  58. $frame deathc9 deathc10 deathc11 deathc12 deathc13 deathc14 deathc15
  59.  
  60. $frame deathd1 deathd2 deathd3 deathd4 deathd5 deathd6 deathd7
  61. $frame deathd8 deathd9
  62.  
  63. $frame deathe1 deathe2 deathe3 deathe4 deathe5 deathe6 deathe7
  64. $frame deathe8 deathe9
  65.  
  66. //
  67. // attacks
  68. //
  69. $frame nailatt1 nailatt2
  70.  
  71. $frame light1 light2
  72.  
  73. $frame rockatt1 rockatt2 rockatt3 rockatt4 rockatt5 rockatt6
  74.  
  75. $frame shotatt1 shotatt2 shotatt3 shotatt4 shotatt5 shotatt6
  76.  
  77. $frame axatt1 axatt2 axatt3 axatt4 axatt5 axatt6
  78.  
  79. $frame axattb1 axattb2 axattb3 axattb4 axattb5 axattb6
  80.  
  81. $frame axattc1 axattc2 axattc3 axattc4 axattc5 axattc6
  82.  
  83. $frame axattd1 axattd2 axattd3 axattd4 axattd5 axattd6
  84.  
  85.  
  86. /*
  87. ==============================================================================
  88. PLAYER
  89. ==============================================================================
  90. */
  91.  
  92. void() player_run;
  93.  
  94. void()    player_stand1 =[    $axstnd1,    player_stand1    ]
  95. {
  96.     self.weaponframe=0;
  97.     if (self.velocity_x || self.velocity_y)
  98.     {
  99.         self.walkframe=0;
  100.         player_run();
  101.         return;
  102.     }
  103.  
  104.   if (self.weapon == IT_AXE || self.weapon == IT_MORNINGSTAR)
  105.     {
  106.         if (self.walkframe >= 12)
  107.             self.walkframe = 0;
  108.         self.frame = $axstnd1 + self.walkframe;
  109.     }
  110.     else
  111.     {
  112.         if (self.walkframe >= 5)
  113.             self.walkframe = 0;
  114.         self.frame = $stand1 + self.walkframe;
  115.     }
  116.     self.walkframe = self.walkframe + 1;    
  117. };
  118.  
  119. void()    player_run =[    $rockrun1,    player_run    ]
  120. {
  121.     self.weaponframe=0;
  122.     if (!self.velocity_x && !self.velocity_y)
  123.     {
  124.         self.walkframe=0;
  125.         player_stand1();
  126.         return;
  127.     }
  128.  
  129.   if (self.weapon == IT_AXE || self.weapon == IT_MORNINGSTAR)
  130.     {
  131.         if (self.walkframe == 6)
  132.             self.walkframe = 0;
  133.         self.frame = $axrun1 + self.walkframe;
  134.     }
  135.     else
  136.     {
  137.         if (self.walkframe == 6)
  138.             self.walkframe = 0;
  139.         self.frame = self.frame + self.walkframe;
  140.     }
  141.     self.walkframe = self.walkframe + 1;
  142. };
  143.  
  144.  
  145. void()    player_shot1 =    [$shotatt1, player_shot2    ] {self.weaponframe=1;
  146. self.effects = self.effects | EF_MUZZLEFLASH;};
  147. void()    player_shot2 =    [$shotatt2, player_shot3    ] {self.weaponframe=2;};
  148. void()    player_shot3 =    [$shotatt3, player_shot4    ] {self.weaponframe=3;};
  149. void()    player_shot4 =    [$shotatt4, player_shot5    ] {self.weaponframe=4;};
  150. void()    player_shot5 =    [$shotatt5, player_shot6    ] {self.weaponframe=5;};
  151. void()    player_shot6 =    [$shotatt6, player_run    ] {self.weaponframe=6;};
  152.  
  153. void()    player_axe1 =    [$axatt1, player_axe2    ] {self.weaponframe=1;};
  154. void()    player_axe2 =    [$axatt2, player_axe3    ] {self.weaponframe=2;};
  155. void()    player_axe3 =    [$axatt3, player_axe4    ] {self.weaponframe=3;W_FireAxe();};
  156. void()    player_axe4 =    [$axatt4, player_run    ] {self.weaponframe=4;};
  157.  
  158. void()    player_axeb1 =    [$axattb1, player_axeb2    ] {self.weaponframe=5;};
  159. void()    player_axeb2 =    [$axattb2, player_axeb3    ] {self.weaponframe=6;};
  160. void()    player_axeb3 =    [$axattb3, player_axeb4    ] {self.weaponframe=7;W_FireAxe();};
  161. void()    player_axeb4 =    [$axattb4, player_run    ] {self.weaponframe=8;};
  162.  
  163. void()    player_axec1 =    [$axattc1, player_axec2    ] {self.weaponframe=1;};
  164. void()    player_axec2 =    [$axattc2, player_axec3    ] {self.weaponframe=2;};
  165. void()    player_axec3 =    [$axattc3, player_axec4    ] {self.weaponframe=3;W_FireAxe();};
  166. void()    player_axec4 =    [$axattc4, player_run    ] {self.weaponframe=4;};
  167.  
  168. void()    player_axed1 =    [$axattd1, player_axed2    ] {self.weaponframe=5;};
  169. void()    player_axed2 =    [$axattd2, player_axed3    ] {self.weaponframe=6;};
  170. void()    player_axed3 =    [$axattd3, player_axed4    ] {self.weaponframe=7;W_FireAxe();};
  171. void()    player_axed4 =    [$axattd4, player_run    ] {self.weaponframe=8;};
  172.  
  173.  
  174. void()  player_chain1 = [$axattd1, player_chain2 ] { self.weaponframe=2; };
  175. void()  player_chain2 = [$axattd2, player_chain3 ]
  176. {
  177.   self.weaponframe = 3;
  178.   W_FireChain();
  179. };
  180. void()  player_chain3 = [$axattd3, player_chain3 ]
  181. {
  182.   self.weaponframe = 3;
  183.   if (self.hook == world)
  184.   {
  185.     player_chain5();
  186.     return;
  187.   }
  188.   if (vlen(self.velocity) >= 750)
  189.   {
  190.     player_chain4();
  191.     return;
  192.   }
  193. };
  194. void() player_chain4 = [$deathc4, player_chain4 ]
  195. {
  196.   self.weaponframe = 4;
  197.   if (self.hook == world)
  198.   {
  199.     player_chain5();
  200.     return;
  201.   }
  202.   if (vlen(self.velocity) < 750)
  203.   {
  204.     player_chain3();
  205.     return;
  206.   }
  207. };
  208. void()  player_chain5 = [$axattd4, player_run] { self.weaponframe=5; };
  209.  
  210. //============================================================================
  211.  
  212. void() player_nail1   =[$nailatt1, player_nail2  ]
  213. {
  214.     self.effects = self.effects | EF_MUZZLEFLASH;
  215.  
  216.     if (!self.button0)
  217.         {player_run ();return;}
  218.     self.weaponframe = self.weaponframe + 1;
  219.     if (self.weaponframe == 9)
  220.         self.weaponframe = 1;
  221.     SuperDamageSound();
  222.     W_FireSpikes (4);
  223.     self.attack_finished = time + 0.2;
  224. };
  225. void() player_nail2   =[$nailatt2, player_nail1  ]
  226. {
  227.     self.effects = self.effects | EF_MUZZLEFLASH;
  228.  
  229.     if (!self.button0)
  230.         {player_run ();return;}
  231.     self.weaponframe = self.weaponframe + 1;
  232.     if (self.weaponframe == 9)
  233.         self.weaponframe = 1;
  234.     SuperDamageSound();
  235.     W_FireSpikes (-4);
  236.     self.attack_finished = time + 0.2;
  237. };
  238.  
  239. //============================================================================
  240.  
  241. void() player_light1   =[$light1, player_light2  ] 
  242. {
  243.     self.effects = self.effects | EF_MUZZLEFLASH;
  244.  
  245.     if (!self.button0)
  246.         {player_run ();return;}
  247.     self.weaponframe = self.weaponframe + 1;
  248.     if (self.weaponframe == 5)
  249.         self.weaponframe = 1;
  250.     SuperDamageSound();
  251.     W_FireLightning();
  252.     self.attack_finished = time + 0.2;
  253. };
  254. void() player_light2   =[$light2, player_light1  ]
  255. {
  256.     self.effects = self.effects | EF_MUZZLEFLASH;
  257.  
  258.     if (!self.button0)
  259.         {player_run ();return;}
  260.     self.weaponframe = self.weaponframe + 1;
  261.     if (self.weaponframe == 5)
  262.         self.weaponframe = 1;
  263.     SuperDamageSound();
  264.     W_FireLightning();
  265.     self.attack_finished = time + 0.2;
  266. };
  267.  
  268. //============================================================================
  269.  
  270.  
  271. void() player_rocket1   =[$rockatt1, player_rocket2  ] {self.weaponframe=1;
  272. self.effects = self.effects | EF_MUZZLEFLASH;};
  273. void() player_rocket2   =[$rockatt2, player_rocket3  ] {self.weaponframe=2;};
  274. void() player_rocket3   =[$rockatt3, player_rocket4  ] {self.weaponframe=3;};
  275. void() player_rocket4   =[$rockatt4, player_rocket5  ] {self.weaponframe=4;};
  276. void() player_rocket5   =[$rockatt5, player_rocket6  ] {self.weaponframe=5;};
  277. void() player_rocket6   =[$rockatt6, player_run  ] {self.weaponframe=6;};
  278. void(float num_bubbles) DeathBubbles;
  279.  
  280. void() PainSound =
  281. {
  282. local float        rs;
  283.  
  284.     if (self.health < 0)
  285.         return;
  286.  
  287.     if (damage_attacker.classname == "teledeath")
  288.     {
  289.         sound (self, CHAN_VOICE, "player/teledth1.wav", 1, ATTN_NONE);
  290.         return;
  291.     }
  292.  
  293. // water pain sounds
  294.     if (self.watertype == CONTENT_WATER && self.waterlevel == 3)
  295.     {
  296.         DeathBubbles(1);
  297.         if (random() > 0.5)
  298.             sound (self, CHAN_VOICE, "player/drown1.wav", 1, ATTN_NORM);
  299.         else
  300.             sound (self, CHAN_VOICE, "player/drown2.wav", 1, ATTN_NORM);
  301.         return;
  302.     }
  303.  
  304. // slime pain sounds
  305.     if (self.watertype == CONTENT_SLIME)
  306.     {
  307. // FIX ME    put in some steam here
  308.         if (random() > 0.5)
  309.             sound (self, CHAN_VOICE, "player/lburn1.wav", 1, ATTN_NORM);
  310.         else
  311.             sound (self, CHAN_VOICE, "player/lburn2.wav", 1, ATTN_NORM);
  312.         return;
  313.     }
  314.  
  315.     if (self.watertype == CONTENT_LAVA)
  316.     {
  317.         if (random() > 0.5)
  318.             sound (self, CHAN_VOICE, "player/lburn1.wav", 1, ATTN_NORM);
  319.         else
  320.             sound (self, CHAN_VOICE, "player/lburn2.wav", 1, ATTN_NORM);
  321.         return;
  322.     }
  323.  
  324.     if (self.pain_finished > time)
  325.     {
  326.         self.axhitme = 0;
  327.         return;
  328.     }
  329.     self.pain_finished = time + 0.5;
  330.  
  331. // don't make multiple pain sounds right after each other
  332.  
  333. // ax pain sound
  334.     if (self.axhitme == 1)
  335.     {
  336.         self.axhitme = 0;
  337.         sound (self, CHAN_VOICE, "player/axhit1.wav", 1, ATTN_NORM);
  338.         return;
  339.     }
  340.     
  341.  
  342.     rs = rint((random() * 5) + 1);
  343.  
  344.     self.noise = "";
  345.     if (rs == 1)
  346.         self.noise = "player/pain1.wav";
  347.     else if (rs == 2)
  348.         self.noise = "player/pain2.wav";
  349.     else if (rs == 3)
  350.         self.noise = "player/pain3.wav";
  351.     else if (rs == 4)
  352.         self.noise = "player/pain4.wav";
  353.     else if (rs == 5)
  354.         self.noise = "player/pain5.wav";
  355.     else
  356.         self.noise = "player/pain6.wav";
  357.  
  358.     sound (self, CHAN_VOICE, self.noise, 1, ATTN_NORM);
  359.     return;
  360. };
  361.  
  362. void()    player_pain1 =    [    $pain1,    player_pain2    ] {PainSound();self.weaponframe=0;};
  363. void()    player_pain2 =    [    $pain2,    player_pain3    ] {};
  364. void()    player_pain3 =    [    $pain3,    player_pain4    ] {};
  365. void()    player_pain4 =    [    $pain4,    player_pain5    ] {};
  366. void()    player_pain5 =    [    $pain5,    player_pain6    ] {};
  367. void()    player_pain6 =    [    $pain6,    player_run    ] {};
  368.  
  369. void()    player_axpain1 =    [    $axpain1,    player_axpain2    ] {PainSound();self.weaponframe=0;};
  370. void()    player_axpain2 =    [    $axpain2,    player_axpain3    ] {};
  371. void()    player_axpain3 =    [    $axpain3,    player_axpain4    ] {};
  372. void()    player_axpain4 =    [    $axpain4,    player_axpain5    ] {};
  373. void()    player_axpain5 =    [    $axpain5,    player_axpain6    ] {};
  374. void()    player_axpain6 =    [    $axpain6,    player_run    ] {};
  375.  
  376. void() player_pain =
  377. {
  378.     if (self.weaponframe)
  379.         return;
  380.  
  381.     if (self.invisible_finished > time)
  382.         return;        // eyes don't have pain frames
  383.  
  384.   if (self.weapon == IT_AXE || self.weapon == IT_MORNINGSTAR)
  385.         player_axpain1 ();
  386.     else
  387.         player_pain1 ();
  388. };
  389.  
  390. void() player_diea1;
  391. void() player_dieb1;
  392. void() player_diec1;
  393. void() player_died1;
  394. void() player_diee1;
  395. void() player_die_ax1;
  396.  
  397. void() DeathBubblesSpawn =
  398. {
  399. local entity    bubble;
  400.     if (self.owner.waterlevel != 3)
  401.         return;
  402.     bubble = spawn();
  403.     setmodel (bubble, "progs/s_bubble.spr");
  404.     setorigin (bubble, self.owner.origin + '0 0 24');
  405.     bubble.movetype = MOVETYPE_NOCLIP;
  406.     bubble.solid = SOLID_NOT;
  407.     bubble.velocity = '0 0 15';
  408.     bubble.nextthink = time + 0.5;
  409.     bubble.think = bubble_bob;
  410.     bubble.classname = "bubble";
  411.     bubble.frame = 0;
  412.     bubble.cnt = 0;
  413.     setsize (bubble, '-8 -8 -8', '8 8 8');
  414.     self.nextthink = time + 0.1;
  415.     self.think = DeathBubblesSpawn;
  416.     self.air_finished = self.air_finished + 1;
  417.     if (self.air_finished >= self.bubble_count)
  418.         remove(self);
  419. };
  420.  
  421. void(float num_bubbles) DeathBubbles =
  422. {
  423. local entity    bubble_spawner;
  424.     
  425.     bubble_spawner = spawn();
  426.     setorigin (bubble_spawner, self.origin);
  427.     bubble_spawner.movetype = MOVETYPE_NONE;
  428.     bubble_spawner.solid = SOLID_NOT;
  429.     bubble_spawner.nextthink = time + 0.1;
  430.     bubble_spawner.think = DeathBubblesSpawn;
  431.     bubble_spawner.air_finished = 0;
  432.     bubble_spawner.owner = self;
  433.     bubble_spawner.bubble_count = num_bubbles;
  434.     return;
  435. };
  436.  
  437.  
  438. void() DeathSound =
  439. {
  440. local float        rs;
  441.  
  442.     // water death sounds
  443.     if (self.waterlevel == 3)
  444.     {
  445.         DeathBubbles(20);
  446.         sound (self, CHAN_VOICE, "player/h2odeath.wav", 1, ATTN_NONE);
  447.         return;
  448.     }
  449.     
  450.     rs = rint ((random() * 4) + 1);
  451.     if (rs == 1)
  452.         self.noise = "player/death1.wav";
  453.     if (rs == 2)
  454.         self.noise = "player/death2.wav";
  455.     if (rs == 3)
  456.         self.noise = "player/death3.wav";
  457.     if (rs == 4)
  458.         self.noise = "player/death4.wav";
  459.     if (rs == 5)
  460.         self.noise = "player/death5.wav";
  461.  
  462.     sound (self, CHAN_VOICE, self.noise, 1, ATTN_NONE);
  463.     return;
  464. };
  465.  
  466.  
  467. void() PlayerTouch =
  468. {
  469.     // DM code
  470.     if (teamplay == -2)  // Allowing touch-tagging other player IT?
  471.     {
  472.         // Only allow a live player to be tagged.
  473.         if (other.classname != "player" || other.deadflag)
  474.             return;
  475.         // Make certain current player is IT?
  476.         if (self.start_team != actual_team2)
  477.             return;
  478.         // Don't allow a new IT player to tag another immediately.
  479.         if (time < tag_wait_time)
  480.             return;
  481.  
  482.         // Remove IT from touching player.
  483.         ConfigTeam(1, 0);
  484.         self.start_team = assigned_team;
  485.         self.team = -1;  // Indicate a tag was made.
  486.         ConfigTeam(2, 0);
  487.         other.start_team = assigned_team;
  488.         other.team = -1;  // Indicate a tag was made.
  489.  
  490.         tag_wait_time = time + 2;
  491.     }
  492. };
  493.  
  494.  
  495. void() SUB_Gib;
  496.  
  497.  
  498. void() GibPlayer =
  499. {
  500.     ThrowHead ("progs/h_player.mdl", self.health);
  501.     ThrowGib ("progs/gib1.mdl", self.health);
  502.     ThrowGib ("progs/gib2.mdl", self.health);
  503.     ThrowGib ("progs/gib3.mdl", self.health);
  504.  
  505.     if (damage_attacker.classname == "teledeath")
  506.         sound (self, CHAN_VOICE, "player/teledth1.wav", 1, ATTN_NONE);
  507.     else if (damage_attacker.classname == "teledeath2")
  508.         sound (self, CHAN_VOICE, "player/teledth1.wav", 1, ATTN_NONE);
  509.     else if (self.deadflag == DEAD_DEAD)
  510.         sound (self, CHAN_VOICE, "player/tornoff2.wav", 1, ATTN_NONE);
  511.     else if (random() < 0.5)
  512.         sound (self, CHAN_VOICE, "player/gib.wav", 1, ATTN_NONE);
  513.     else
  514.         sound (self, CHAN_VOICE, "player/udeath.wav", 1, ATTN_NONE);
  515.  
  516.     self.deadflag = DEAD_DEAD;
  517. };
  518.  
  519.  
  520. void() PlayerCorpseGib =
  521. {
  522.     self.takedamage= DAMAGE_AIM; // grenades explode 
  523.     if (self.health < -40)
  524.     {
  525.         self.deadflag = DEAD_DEAD;  // Noting that corpse was already dead.
  526.         GibPlayer();
  527.         self.think = SUB_Null;
  528.     }
  529.     else
  530.         SUB_Gib();
  531. };
  532.  
  533.  
  534. void() PlayerDead =
  535. {
  536.     self.nextthink = -1;
  537. // allow respawn after a certain time
  538.     self.deadflag = DEAD_DEAD;
  539.  
  540.     if (deathmatch || coop)
  541.     {
  542. /*
  543.         self.th_stand = SUB_Null;
  544.         self.th_walk = SUB_Null;
  545.         self.th_run = SUB_Null;
  546.         self.th_melee = SUB_Null;
  547.         self.th_missile = SUB_Null;
  548. */
  549.         if (solid_corpse)
  550.         {
  551.             local vector min, max;
  552.  
  553.             if ( self.frame == $axdeth9 )
  554.             {
  555.                 min = '-16 -12 -24';
  556.                 max = '16 12 -8';
  557.             }
  558.             else if ( self.frame == $deatha11 )
  559.             {
  560.                 min = '-16 -12 -24';
  561.                 max = '16 12 -8';
  562.             }
  563.             else if ( self.frame == $deathb9 )
  564.             {
  565.                 min = '-16 -12 -24';
  566.                 max = '16 12 6';
  567.             }
  568.             else if ( self.frame == $deathc15 )
  569.             {
  570.                 min = '-16 -12 -24';
  571.                 max = '16 12 -8';
  572.             }
  573.             else if ( self.frame == $deathd9 )
  574.             {
  575.                 min = '-16 -12 -24';
  576.                 max = '16 12 -8';
  577.             }
  578.             else if ( self.frame == $deathe9 )
  579.             {
  580.                 min = '-16 -12 -24';
  581.                 max = '16 12 -8';
  582.             }
  583.  
  584.             self.health = -1;
  585.             self.mins = min;
  586.             self.maxs = max;
  587.             self.size = max - min;
  588.             self.solid = SOLID_SLIDEBOX;
  589.             self.th_pain = PlayerCorpseGib;
  590.             self.th_die = PlayerCorpseGib;
  591.             self.takedamage = DAMAGE_AIM; // grenades explode
  592.  
  593.             DropCorpse();
  594.         }
  595.         else
  596.         {
  597.             self.th_pain = SUB_Null;
  598.             self.th_die = SUB_Null;
  599.         }
  600.     }
  601. };
  602.  
  603. void() PlayerDie =
  604. {
  605.   local float i;
  606.  
  607.     self.items = self.items - (self.items & IT_INVISIBILITY);
  608.     self.invisible_finished = 0;    // don't die as eyes
  609.     self.invincible_finished = 0;
  610.     self.super_damage_finished = 0;
  611.     self.radsuit_finished = 0;
  612.     self.modelindex = modelindex_player;    // don't use eyes
  613.  
  614.     if (deathmatch || coop)
  615.         DropBackpack();
  616.     
  617.     self.weaponmodel = "";
  618.     self.view_ofs = '0 0 -8';
  619.     self.deadflag = DEAD_DYING;
  620.     self.solid = SOLID_NOT;
  621.     self.flags = self.flags - (self.flags & FL_ONGROUND);
  622.     self.movetype = MOVETYPE_BOUNCE;
  623.     if (self.velocity_z < 10)
  624.         self.velocity_z = self.velocity_z + random()*300;
  625.  
  626.     if (self.health < -40)
  627.     {
  628.         GibPlayer ();
  629.         return;
  630.     }
  631.  
  632.     DeathSound();
  633.  
  634.     self.angles_x = 0;
  635.     self.angles_z = 0;
  636.  
  637.   if (self.weapon == IT_AXE || self.weapon == IT_MORNINGSTAR)
  638.         player_die_ax1 ();
  639.     else
  640.     {
  641. //        i = cvar("temp1");
  642. //        if (!i)
  643.             i = 1 + floor(random()*6);
  644.  
  645.         if (i == 1)
  646.             player_diea1();
  647.         else if (i == 2)
  648.             player_dieb1();
  649.         else if (i == 3)
  650.             player_diec1();
  651.         else if (i == 4)
  652.             player_died1();
  653.         else
  654.             player_diee1();
  655.     }
  656. };
  657.  
  658. void() set_suicide_frame =
  659. {    // used by kill command and disconnect command
  660.     if (self.health <= 0)
  661.         return;    // already dead
  662.  
  663.     self.health = -50;
  664.     GibPlayer ();
  665. };
  666.  
  667.  
  668. void()    player_diea1    =    [    $deatha1,    player_diea2    ] {};
  669. void()    player_diea2    =    [    $deatha2,    player_diea3    ] {};
  670. void()    player_diea3    =    [    $deatha3,    player_diea4    ] {};
  671. void()    player_diea4    =    [    $deatha4,    player_diea5    ] {};
  672. void()    player_diea5    =    [    $deatha5,    player_diea6    ] {};
  673. void()    player_diea6    =    [    $deatha6,    player_diea7    ] {};
  674. void()    player_diea7    =    [    $deatha7,    player_diea8    ] {};
  675. void()    player_diea8    =    [    $deatha8,    player_diea9    ] {};
  676. void()    player_diea9    =    [    $deatha9,    player_diea10    ] {};
  677. void()    player_diea10    =    [    $deatha10,    player_diea11    ] {};
  678. void()    player_diea11    =    [    $deatha11,    player_diea11 ] {PlayerDead();};
  679.  
  680. void()    player_dieb1    =    [    $deathb1,    player_dieb2    ] {};
  681. void()    player_dieb2    =    [    $deathb2,    player_dieb3    ] {};
  682. void()    player_dieb3    =    [    $deathb3,    player_dieb4    ] {};
  683. void()    player_dieb4    =    [    $deathb4,    player_dieb5    ] {};
  684. void()    player_dieb5    =    [    $deathb5,    player_dieb6    ] {};
  685. void()    player_dieb6    =    [    $deathb6,    player_dieb7    ] {};
  686. void()    player_dieb7    =    [    $deathb7,    player_dieb8    ] {};
  687. void()    player_dieb8    =    [    $deathb8,    player_dieb9    ] {};
  688. void()    player_dieb9    =    [    $deathb9,    player_dieb9    ] {PlayerDead();};
  689.  
  690. void()    player_diec1    =    [    $deathc1,    player_diec2    ] {};
  691. void()    player_diec2    =    [    $deathc2,    player_diec3    ] {};
  692. void()    player_diec3    =    [    $deathc3,    player_diec4    ] {};
  693. void()    player_diec4    =    [    $deathc4,    player_diec5    ] {};
  694. void()    player_diec5    =    [    $deathc5,    player_diec6    ] {};
  695. void()    player_diec6    =    [    $deathc6,    player_diec7    ] {};
  696. void()    player_diec7    =    [    $deathc7,    player_diec8    ] {};
  697. void()    player_diec8    =    [    $deathc8,    player_diec9    ] {};
  698. void()    player_diec9    =    [    $deathc9,    player_diec10    ] {};
  699. void()    player_diec10    =    [    $deathc10,    player_diec11    ] {};
  700. void()    player_diec11    =    [    $deathc11,    player_diec12    ] {};
  701. void()    player_diec12    =    [    $deathc12,    player_diec13    ] {};
  702. void()    player_diec13    =    [    $deathc13,    player_diec14    ] {};
  703. void()    player_diec14    =    [    $deathc14,    player_diec15    ] {};
  704. void()    player_diec15    =    [    $deathc15,    player_diec15 ] {PlayerDead();};
  705.  
  706. void()    player_died1    =    [    $deathd1,    player_died2    ] {};
  707. void()    player_died2    =    [    $deathd2,    player_died3    ] {};
  708. void()    player_died3    =    [    $deathd3,    player_died4    ] {};
  709. void()    player_died4    =    [    $deathd4,    player_died5    ] {};
  710. void()    player_died5    =    [    $deathd5,    player_died6    ] {};
  711. void()    player_died6    =    [    $deathd6,    player_died7    ] {};
  712. void()    player_died7    =    [    $deathd7,    player_died8    ] {};
  713. void()    player_died8    =    [    $deathd8,    player_died9    ] {};
  714. void()    player_died9    =    [    $deathd9,    player_died9    ] {PlayerDead();};
  715.  
  716. void()    player_diee1    =    [    $deathe1,    player_diee2    ] {};
  717. void()    player_diee2    =    [    $deathe2,    player_diee3    ] {};
  718. void()    player_diee3    =    [    $deathe3,    player_diee4    ] {};
  719. void()    player_diee4    =    [    $deathe4,    player_diee5    ] {};
  720. void()    player_diee5    =    [    $deathe5,    player_diee6    ] {};
  721. void()    player_diee6    =    [    $deathe6,    player_diee7    ] {};
  722. void()    player_diee7    =    [    $deathe7,    player_diee8    ] {};
  723. void()    player_diee8    =    [    $deathe8,    player_diee9    ] {};
  724. void()    player_diee9    =    [    $deathe9,    player_diee9    ] {PlayerDead();};
  725.  
  726. void()    player_die_ax1    =    [    $axdeth1,    player_die_ax2    ] {};
  727. void()    player_die_ax2    =    [    $axdeth2,    player_die_ax3    ] {};
  728. void()    player_die_ax3    =    [    $axdeth3,    player_die_ax4    ] {};
  729. void()    player_die_ax4    =    [    $axdeth4,    player_die_ax5    ] {};
  730. void()    player_die_ax5    =    [    $axdeth5,    player_die_ax6    ] {};
  731. void()    player_die_ax6    =    [    $axdeth6,    player_die_ax7    ] {};
  732. void()    player_die_ax7    =    [    $axdeth7,    player_die_ax8    ] {};
  733. void()    player_die_ax8    =    [    $axdeth8,    player_die_ax9    ] {};
  734. void()    player_die_ax9    =    [    $axdeth9,    player_die_ax9    ] {PlayerDead();};
  735.